home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Developer Utilities / Installer 4.0.3 SDK / Script Examples / Action Atoms [inaa] Example / Makefile < prev    next >
Encoding:
Makefile  |  1994-11-15  |  5.8 KB  |  144 lines  |  [TEXT/MPS ]

  1. #
  2. #    makefile for "myActionAtoms.r", the example for action atoms
  3. #
  4. #
  5. #        to build installer script :
  6. #            1) select "Build" from "Build" menu
  7. #            2) type script name "myActionAtoms" ( note: ".r" is omitted )
  8. #            
  9. #        to build debug version of installer script :
  10. #            1) select "Build" from "Build" menu
  11. #            2) type script name "myActionAtoms.debug" ( note: ".r" is omitted )
  12. #            
  13. #
  14. #    mark young - 08/17/94
  15. #
  16.  
  17. scriptName                = myActionAtoms
  18. debugScriptName            = "{scriptName}.debug"
  19.  
  20. # You may change the following paths as you see fit. Currently all paths 
  21. # are set so that scripts will compile when using the original directory
  22. # layout from the Installer SDK.
  23.  
  24. # You may place the ScriptCheck tool in the 'MPW:Tools' directory. Doing this
  25. # removes the need for the {ScriptCheckDir} variable within the makefile.
  26. ScriptCheckDir            = :::ScriptCheck 4.0.3:
  27.  
  28. # You may place "InstallerTypes.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  29. # Doing this removes the need for the {InstallerRIncDir} variable or -i specification
  30. # for Rez and compile ( C ) commands within the makefile.
  31. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  32.  
  33. # You may place the contents of the "DeveloperInterfaces:CIncludes:" folder
  34. # in your 'MPW:Interfaces:CSources' folder. Doing this removes the need for the
  35. # {InstallerCIncDir} variable within the makefile and the -i option in the compile
  36. # command line.
  37. InstallerCIncDir        = :::DeveloperInterfaces:CIncludes:
  38.  
  39. # You may place "Installer Debugger.r" file in the 'MPW:Interfaces:RIncludes:' directory. 
  40. # Doing this removes the need for the {InstallerDebuggerDir} variable within the makefile.
  41. InstallerDebuggerDir    = :::Installer Debugger 4.0:
  42.  
  43. # • action atom stuff
  44.  
  45. # You may use this makefile to compile your own action atoms.
  46. # Just replace the 'ActionAtomFileName<n>' value "myActionAtom_<n>.rsrc",
  47. # the 'AtomSourceName<n>' value "atom<n>.c", and the 'AtomRsrcID_<n>'
  48. # value with the appropriate resource type and ID for your action
  49. # atom code resource. Be sure to specify the action atom resource
  50. # type and ID with the identical values in your source ( .r ) file
  51. # for the installer script.
  52.  
  53. # NOTE: The format2 action atom includes the external routines library
  54. # so the section in this makefile that creates the format2 action atom
  55. # is different that the sections that create the format0 and format1
  56. # action atoms.
  57.  
  58. ActionAtomFileName0        = myActionAtom_0.rsrc
  59. AtomSourceName0            = atom0.c
  60. AtomRsrcID_0            = infn=9000
  61.  
  62. ActionAtomFileName1        = myActionAtom_1.rsrc
  63. AtomSourceName1            = atom1.c
  64. AtomRsrcID_1            = infn=9001
  65.  
  66. ActionAtomFileName2        = myActionAtom_2.rsrc
  67. AtomSourceName2            = atom2.c
  68. AtomRsrcID_2            = infn=9002
  69.  
  70. ProgressAtomFileName    = ProgressAtom.rsrc
  71. ProgressAtomSourceName    = ProgressAtom.c
  72. ProgressAtomRsrcID        = infn=9003
  73.  
  74.  
  75.  
  76. "{debugScriptName}" ƒ "{scriptName}"
  77.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  78.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  79.  
  80. "{scriptName}" ƒ "{scriptName}.r" "{ActionAtomFileName0}" "{ActionAtomFileName1}" "{ActionAtomFileName2}" "{ProgressAtomFileName}"
  81.     set theTime    "'`date -d -s` 12:00:00 PM'"
  82.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
  83.     SetFile -a b -d {theTime} "{scriptName}"
  84.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  85.     SetFile -m {theTime} "{scriptName}"
  86.  
  87. "{ActionAtomFileName0}" ƒ "{AtomSourceName0}"
  88.     C -r -b "{AtomSourceName0}" -i "{InstallerCIncDir}"
  89.     Link -ra =resPurgeable -rt "{AtomRsrcID_0}" -rn -m ACTIONATOMFORMAT0 -t rsrc -c RSED -sg Main=STDCLIB ∂
  90.         "{AtomSourceName0}.o" ∂
  91. #        "{Libraries}Interface.o" ∂
  92. #        "{CLibraries}StdCLib.o" ∂
  93.         -o "{ActionAtomFileName0}"
  94.  
  95. "{ActionAtomFileName1}" ƒ "{AtomSourceName1}"
  96.     C -r -b "{AtomSourceName1}" -i "{InstallerCIncDir}"
  97.     Link -ra =resPurgeable -rt "{AtomRsrcID_1}" -rn -m ACTIONATOMFORMAT1 -t rsrc -c RSED -sg Main=STDCLIB ∂
  98.         "{AtomSourceName1}.o" ∂
  99. #        "{Libraries}Interface.o" ∂
  100. #        "{CLibraries}StdCLib.o" ∂
  101.         -o "{ActionAtomFileName1}"
  102.  
  103. # this example needs the external lib with all the installer functions
  104. # in this case specifically to print progress information from within
  105. # the format2 action atom to the Wasabi Installer Debugger
  106. "{ActionAtomFileName2}" ƒ "{AtomSourceName2}" "ExternalLib.o"
  107.     C -r -b "{AtomSourceName2}" -i "{InstallerCIncDir}"
  108.     Link -ra =resPurgeable -rt "{AtomRsrcID_2}" -rn -m ActionAtomFormat2 -t rsrc -c RSED -sg Main=STDCLIB ∂
  109.         "{AtomSourceName2}.o" ∂
  110.         "{Libraries}Interface.o" ∂
  111.         "ExternalLib.o" ∂
  112.         -o "{ActionAtomFileName2}"
  113.  
  114.  
  115.  
  116. # this example needs the external lib with all the installer functions
  117. # in this case specifically display progress in the installer dialog
  118. # from a format2 action atom
  119. "{ProgressAtomFileName}" ƒ "{ProgressAtomSourceName}" "ExternalLib.o"
  120.     C -r -b "{ProgressAtomSourceName}" -i "{InstallerCIncDir}"
  121.     Link -ra =resPurgeable -rt "{ProgressAtomRsrcID}" -rn -m ActionAtomFormat2 -t rsrc -c RSED -sg Main=STDCLIB ∂
  122.         "{ProgressAtomSourceName}.o" ∂
  123.         "{Libraries}Interface.o" ∂
  124.         "ExternalLib.o" ∂
  125.         -o "{ProgressAtomFileName}"
  126.  
  127.  
  128. # • external library stuff ( contains the 'glue' routines for Installer callback routines, etc. )
  129.  
  130. InstallerCSrcDir        = :::DeveloperInterfaces:CSources:
  131.  
  132. # This external library contains all the cool installer function stuff.
  133. # For simplicity's sake we are going ahead and compiling the complete 
  134. # library containing all the installer functions. You can, once compiled
  135. # link this library in to any action atom, search proc, action handler, etc.
  136. # Be careful if you remove any of the files from this library to give the
  137. # library a unique name, so as not to confuse the complete library with 
  138. # the customized/minimized library. All the files that go into making the
  139. # external library are contained in 'ExtLibraryRoutines.c' in this folder.
  140. "ExternalLib.o" ƒƒ  "ExtLibraryRoutines.c"
  141.     C -r -b -i "{InstallerCSrcDir}" -i "{InstallerCIncDir}" "ExtLibraryRoutines.c"
  142.     Lib -d -mf -o "ExternalLib.o" "ExtLibraryRoutines.c.o"
  143.  
  144.